import { reactive, watchEffect, computed, ref, isReactive } from "../lib/vue.esm-browser.js";
import { observer } from "../data/index.js";
// import { reactive, effect, computed, ref } from "../reactive/index.js";

let total = 0;
console.log(observer);
const target = reactive(observer);

const qa = ref(observer);
console.log(qa);
console.log(target);
console.log(target.__proto__);
console.log(target["__v_isReactive" /* RAW */]);

// const wrapper = reactive(observer.products);
// watchEffect(()=> {
// 	total = wrapper.count * wrapper.price;
// })

// console.log(computed(() => {
// 	wrapper.count * wrapper.price
// }));

// const callback = () => {
//   total = target.products.count * target.products.price;
// }

// const compute = () => {
//   return target.products.count * target.products.price;
// }

// let sum = computed(compute)


// effect(callback, {
//   lazy: true
// })

// effect(callback)

// console.log(sum.value);


setTimeout(() => {
  target.products.count = 1;
  // console.log(sum.value);
}, 4000);


console.log(target.data);
// delete target.name;
